package com.come4loves.game.module.skill;

import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.PostConstruct;

import com.come4loves.game.module.fight.model.ActorBattle;

public abstract class AbstractSkillTargetActor {
	private static Map<Integer, AbstractSkillTargetActor> map = new HashMap<Integer, AbstractSkillTargetActor>();
	
	@PostConstruct
	protected void init() {
		map.put(this.id(), this);
	} 
	
	public static AbstractSkillTargetActor get(Integer id) {
		return map.get(id);
	}
	public abstract int id();
	public abstract List<ActorBattle> getTargets(ActorBattle attacker,Collection<ActorBattle> allActorBattles);
}
